<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title><< title >></title>
    <link rel="stylesheet" href="<< url_for('static', filename='layui/css/layui.css') >>">
    <link rel="stylesheet" href="<< url_for('static', filename='css/global.css') >>">
    <link rel="stylesheet" href="<< url_for('static', filename='css/main.css') >>">
</head>
<body>
    <div class="layui-header header header-doc">
        <div class="layui-container">
            <a class="logo" href="/">
                Image
            </a>
            <div class="layui-form layui-hide-xs component" lay-filter="LAY-site-header-component">
                <form class="layui-form" action="">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <input type="text" name="key" required lay-verify="required" placeholder="请输入搜索内容"
                                   autocomplete="off" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline"><button type="button" class="layui-btn" lay-submit lay-filter="search">检索</button></div></div>
                    </div>
                </form>
            </div>
            <ul class="layui-nav">
                <li class="layui-nav-item" id="home"><a href="/">首页</a></li>
                <li class="layui-nav-item" id="meinv"><a href="/meinv">美女图片</a></li>
                <li class="layui-nav-item" id="manhua"><a href="/manhua">动漫</a></li>
            </ul>
        </div>
    </div>
    <div class="main">
        <% block main %><% endblock %>
    </div>
    <script src="<< url_for('static', filename='layui/layui.js') >>"></script>
    <script>
    layui.use(['jquery','laypage','element','flow','layer','util','form'], function(){
            var $ = layui.jquery,laypage=layui.laypage,element = layui.element,flow = layui.flow,layer = layui.layer,util = layui.util,form = layui.form;
            flow.lazyimg();
            form.on('submit(search)', function(data){
               window.location.href='/search?key='+data.field['key'] //当前容器的全部表单字段，名值对形式：{name: value}
            });
            <% block script %><% endblock %>
        });
    </script>
</body>
</html>